function[] = my_patch_for_stormi(X,Y,Data),

errlimit = 0;
min_num = 10;

mindata = 30;
maxdata = 100000;

xx = [X(1)-(X(2)-X(1))/2 X(1:end-1)+diff(X)/2 X(end)+(X(end)-X(end-1))/2];
yy = [Y(1)-(Y(2)-Y(1))/2 Y(1:end-1)+diff(Y)/2 Y(end)+(Y(end)-Y(end-1))/2];

C = colormap; % Reverses -> red for conductor and blue for resistor
kk=1;
for i = 1:length(X),
for j = 1:length(Y),
    if Data(i,j) > errlimit,
    Xpatch(kk,:) = [xx(i) xx(i+1) xx(i+1) xx(i)];
    Ypatch(kk,:) = [yy(j) yy(j) yy(j+1) yy(j+1)];
    cidx = floor(63*(Data(i,j)-mindata)/(maxdata-mindata)+1);
    
    if cidx > 64,
        cidx = 64;
    elseif cidx < 1,
        cidx = 1;
    end;
    Cpatch(1,kk,:) = C(cidx,:);
    kk=kk+1;
    end;
end;
end;
h=patch(Xpatch',Ypatch',Cpatch);
caxis([mindata maxdata]);
colorbar;
set(h,'Edgecolor','none');
more on;